These options specify directories to search for header files, for libraries and for parts of the compiler:
-I
directory
Add the directory directory to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. If you use more than one -I option, the directories are scanned in left-to-right order; the standard system directories come after.
When compiling a C++ file (extension .C , .M , or .cc ), the compiler adds System/Developer/Headers/g++ to its header search path. This allows libg++ classes to be used without having to specify additional command-line options.
-I-
Any directories you specify with -I options before the -I- option are searched only for the case of #include " file " ; they are not searched for #include < file > .
If additional directories are specified with -I options after the -I- , these directories are searched for all #include directives. (Ordinarily all -I directories are used this way.)
In addition, the -I- option inhibits the use of the current directory (where the current input file came from) as the first search directory for #include " file " . There is no way to override this effect of -I- . With -I . you can specify searching the directory which was current when the compiler was invoked. That is not exactly the same as what the preprocessor does by default, but it is often satisfactory.
-I- does not inhibit the use of the standard system directories for header files. Thus, -I- and -nostdinc are independent.
-F
dir
Add the directory dir to the head of the list of directories to be searched for frameworks. If you use more than one -F option, the directories are scanned in left-to-right order; the standard framework directories ( Local/Library/Frameworks , followed by System/Library/Frameworks ) come after.
In your Objective-C code, include framework headers using the following format:
#include <
framework
/
include_file
.h>
Where framework is the name of the framework (such as "AppKit" or "Foundation"--don't include the extension) and include_file is the name of the file to be included.
-B
prefix
This option specifies where to find the executables, libraries, include files, and data files of the compiler itself.
The compiler driver program runs one or more of the subprograms cpp , cc1 , as and ld . It tries prefix as a prefix for each program it tries to run, both with and without machine / version / (see See Hardware Models and Configurations ).
For each subprogram to be run, the compiler driver first tries the -B prefix, if any. If that name is not found, or if -B was not specified, the driver tries two standard prefixes, which are /usr/lib/gcc/ and /usr/local/lib/gcc-lib/ . If neither of those results in a file name that is found, the unmodified program name is searched for using the directories specified in your PATH environment variable.
-B prefixes that effectively specify directory names also apply to libraries in the linker, because the compiler translates these options into -L options for the linker. They also apply to includes files in the preprocessor, because the compiler translates these options into -isystem options for the preprocessor. In this case, the compiler appends include to the prefix.
The run-time support file libgcc.a can also be searched for using the -B prefix, if needed. If it is not found there, the two standard prefixes above are tried, and that is all. The file is left out of the link if it is not found by those means.
Another way to specify a prefix much like the -B prefix is to use the environment variable GCC_EXEC_PREFIX . See See Environment Variables Affecting GNU CC .